package com.yjq.blog.article.feign;

import com.yjq.blog.article.entity.User;
import com.yjq.blog.vo.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(value = "blog-user")
public interface UserClientFeign {

    @RequestMapping(value = "/user/user/{id}")
    Response<User> getUserById(@PathVariable("id") Integer id);

    @RequestMapping(value = "/user/user/list")
    Map<Integer, User> getUserMapByIdList(@RequestParam("idList")List<Integer> idList);

}
